import Row from "@element/Row";
import Col from "@element/Col";
import Container from "@element/Container";
import Main from "@element/Main";
import Aside from "@element/Aside";
import Header from "@element/Header";
import Footer from "@element/Footer";
import Icon from "@element/Icon";
import Button from "@element/Button";
import ButtonGroup from "@element/ButtonGroup";
import Link from "@element/Link";

const components = [Row, Col, Container, Main, Aside, Header, Footer, Icon, Button, ButtonGroup, Link];

const install = (Vue) => {
  components.forEach((el) => {
    Vue.component(el.name, el);
  });
};

// 针对于import element from 'element'
export default {
  install,
  Row,
  Col,
  Container,
  Main,
  Aside,
  Header,
  Footer,
  Icon,
  Button,
  ButtonGroup,
  Link,
};

// 针对于import { Row, Col } from 'element'
export { install, Row, Col, Container, Main, Aside, Header, Footer, Icon, Button, ButtonGroup, Link };
